<!doctype html>
<html>

<head>
    <meta charset="utf-8" />
</head>

<body>
    <textarea id="txt"></textarea>
    <button id="send">发送</button>
    <script src="http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
    <script>
        $('#send').click(function() {
            $.ajax({
                url: 'http://127.0.0:2333',
                method: 'POST',
                data: {
                    msg: $('txt').attr('value')
                },
                async: true,
                success: function() {

                }
            })
        })
    </script>
</body>

</html>